//
//  XYInfoViewController.m
//  十年少
//
//  Created by 尧的mac on 15/11/30.
//  Copyright © 2015年 xxy.icom. All rights reserved.
//

#import "XYInfoViewController.h"

@interface XYInfoViewController ()
@property(nonatomic,weak)UILabel *lable;
@end

@implementation XYInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UILabel * lable = [[UILabel alloc]init];
    lable.font = [UIFont systemFontOfSize:18];
    lable.textColor = [UIColor yellowColor];
    lable.numberOfLines = 0;
    self.lable = lable;
    
    
    UIView * view  = [[UIView alloc]initWithFrame:self.view.bounds];
    view.backgroundColor = [UIColor colorWithRed:120/255.0 green:64/255.0 blue:54/255.0 alpha:1.0];
    [view addSubview:_lable];
    [self.view addSubview:view];
   
    
    
}

-(void)getInfo:(NSString *)lable{
    
    
    NSLog(@"%@",lable);
    CGFloat with = self.view.frame.size.width - 20;
    CGSize size =  [lable boundingRectWithSize:CGSizeMake(with, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18]} context:nil].size;
    self.lable.frame = CGRectMake(10, 80, size.width, size.height);
    self.lable.text = lable;
    
}

@end
